function ShipObject(
		theGame,
		theName,
		theSailingDifficulty,
		theMaximumSpeed,
		theMaximumTonnage,
		theAvatarChance){
	var game = theGame;
	
	var name = theName;
	var sailingDifficulty = theSailingDifficulty;
	var maximumSpeed = theMaximumSpeed;
	var maximumTonnage = theMaximumTonnage;
	var avatarChance = theAvatarChance;
	
	this.getName = function(){return name;}
	this.getSailingDifficulty = function(){return sailingDifficulty;}
	this.getMaximumSpeed = function(){return maximumSpeed;}
	this.getMaximumTonnage = function(){return maximumTonnage;}
	this.getAvatarChance = function(){return avatarChance;}
}
function ShipsObject(theGame){
	var game = theGame;
	var ships = {};
	ships.raft = new ShipObject(
		game,//theGame
		"Raft",//name
		1,//sailingDifficulty
		1,//maximumSpeed
		3,//maximumTonnage
		1);//avatarChance
	this.getShip = function(ship){
		return ships[ship];
	};
	this.getShipList = function(){
		var result = [];
		for(var ship in ships){
			result.push(ship);
		}
		return result;
	};
	this.generateAvatarShip = function(){
		var shipList = this.getShipList();
		var generator = [];
		for(var index=0;index<shipList.length;++index){
			var counter = this.getShip(shipList[index]).getAvatarChance();
			while(counter>0){
				generator.push(shipList[index]);
				counter--;
			}
		}
		return game.getUtilities().getRandomArrayElement(generator);
	};

}
